//
//  NetworkTool.swift
//  Weibo
//
//  Created by 杨雨哲 on 15/6/28.
//  Copyright © 2015年 yyz. All rights reserved.
//

import UIKit
import AFNetworking

class NetworkTool: AFHTTPSessionManager {
    private static let instance:NetworkTool = {
        
            let urlString = "https://api.weibo.com/"
        
            let baseURL = NSURL(string: urlString)!
        
            let tool = NetworkTool(baseURL: baseURL)
            
            tool.responseSerializer.acceptableContentTypes = NSSet(objects: "application/json", "text/json", "text/javascript", "text/plain") as! Set<String>
            
            return tool

        }()
    class func sharedNetworkTool() -> NetworkTool{
        return instance
    }

}
